<ion-view ng-controller="ion_book_usedBookList" view-title="{{getTagFilter() ? getTagFilter() : title}}">
    <ion-nav-buttons side="right">
        <button class="button button-clear button-balanced" ui-sref="book.recommend">书循</button>
    </ion-nav-buttons>
    <ion-content>
        <!-- 排序方式-->
        <div class="button-bar">
            <a class="button button-small" ng-click="sortWay='attributes.price'"
               ng-class="{'button-balanced':sortWay=='attributes.price'}">图书价格</a>
            <a class="button button-small " ng-click="sortWay='attributes.location'"
               ng-class="{'button-balanced':sortWay=='attributes.location'}">离我距离</a>
            <a class="button button-small"
               ng-if="setTagFilter"
               ng-class="{'button-balanced':getTagFilter()}"
               ng-click="chooseBookTagModalView.show()"
               ng-bind="getTagFilter() ? getTagFilter() :'筛选'">
            </a>
            <a class="button button-small button-energized" ng-click="setTagFilter()" ng-if="getTagFilter()">
                取消限制
            </a>
        </div>
        <ion-list>
            <!-- 二手书列表-->
            <ion-one-used-book ng-repeat="usedBook in usedBooks | orderBy:sortWay"
                               used-book="usedBook"></ion-one-used-book>
        </ion-list>
        <ion-infinite-scroll ng-if="hasMore()"
                             on-infinite="loadMore(isbn13)"
                             distance="1%">
        </ion-infinite-scroll>
    </ion-content>
</ion-view>